package com.yoshino.interpreter;

import org.springframework.expression.Expression;
import org.springframework.expression.spel.standard.SpelExpressionParser;

/**
 * @author yoshino
 **/
public class Test {
    public static void main(String[] args) {
        //创建一个Parser对象
        SpelExpressionParser parser = new SpelExpressionParser();

        Expression expression = parser.parseExpression("10 *(2 + 1)*1 +66"); //96
        int result = (Integer) expression.getValue();
        System.out.println(result);
    }
}
